<#include "navi.ftl" />
<div class="searchArea">
	<input id="searchInput" class="searchInput" type="text" value="" />
	<img class="btn_plus_input" src="${webmvc.url.img}/btn_plus_n.png" />

	<p class="searchResult" style="display:none;"><strong><span id="search_word">공동구매</span></strong>에 대한 검색결과 입니다.</p>
</div>
<div class="contentWrap" style="display:none;">
	<div id="itemWrapper">
		<ul id="sch_itemBox">
			<li class="sch_item_none">이름 또는 키워드로 <br/>원하는 공동구매를 찾아보세요.</li>
			<div id="search_data"></div>
		</ul>
	</div>  
</div>

<script type="text/javascript">
$(document).ready(function(){
	
});

$(".btn_plus_input").click(function(){
	$(".searchInput").hide();
	$(".btn_plus_input").hide();
	$(".sch_item_none").hide();
	$(".searchResult").show();
	$(".contentWrap").show();
	
	var query = $(".searchInput").val();
	$("#search_word").html(query);
	var enc_query = encodeURIComponent(query);
	var url = '${webmvc.url.base}/blank/main/searchResult';
	$.get(url, {page:1,query:enc_query}, function(data){
		$("#search_data").html(data);
	});
});
</script>